/*
 * viewAccount.java
 *
 * Created on March 26, 2007, 7:11 AM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package edu.byu.isys413.actions;

import java.util.Random;
import javax.servlet.http.*;
import edu.byu.isys413.group1E.data.*;
import edu.byu.isys413.group1E.handlers.*;

/**This action allows the user to view their login info.
 *
 * @author Kendall Frazier
 */
public class viewAccount implements edu.byu.isys413.web.Action {
    
    /**
     * Creates a new instance of viewAccount
     */
    public viewAccount() {
    }
  
    /** 
     *Processes this method loads in the customer object from the session, and puts it into a request.attribute
     *so that account.jsp can display the login info to the customer.
     *
     *@param HttpServletRequest
     *@param HttpServletResponse
     *
     *@return String the name of the jsp to call
     */
    public String process(HttpServletRequest request, HttpServletResponse response) throws Exception {
        HttpSession session = request.getSession();
        
        CustomerBO custBO = (CustomerBO)session.getAttribute("customer");
        
        request.setAttribute("customer", custBO);
        
            return "account.jsp";
        }//process
               
    }//viewAccount class
    